package cn.itcast.eduservice.controller;

import cn.itcast.commonutils.R;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/eduservice/user")
@RestController
@CrossOrigin //允许跨域
public class EduUserController {
    @PostMapping("login")
    public R login() {
        return R.ok().data("token","testToken");
    }

    @GetMapping("info")
    public R info(){
        return R.ok().data("name","admin").data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80");
    }

    @PostMapping("logout")
    public R logout(){
        return R.ok();
    }
}
